package com.example.openplaydemo;

import android.content.Context;
import android.opengl.GLSurfaceView;
import android.util.AttributeSet;
import android.view.SurfaceHolder;

public class IOpenVideoView extends GLSurfaceView implements SurfaceHolder.Callback {
    public IOpenVideoView(Context context) {
        super(context);
    }

    public IOpenVideoView(Context context, AttributeSet attrs) {
        super(context, attrs);
    }

    @Override
    public void surfaceCreated(SurfaceHolder holder) {
        //super.surfaceCreated(holder);
        //InitVideoVView(holder.getSurface()); tag v0.0.6

        InitOpVideoView(holder.getSurface());

        //adapter system
//        setRenderer((Renderer) this);
//        setRenderMode(GLSurfaceView.RENDERMODE_WHEN_DIRTY);
    }

    @Override
    public void surfaceChanged(SurfaceHolder holder, int format, int w, int h) {
        //super.surfaceChanged(holder, format, w, h);
    }

    @Override
    public void surfaceDestroyed(SurfaceHolder holder) {
        //super.surfaceDestroyed(holder);
    }



    public native void InitOpVideoView(Object surface);
}
